/*
 * @Author: zhang ke
 * @Date: 2025-06-26 15:31:34
 * @LastEditors: your name
 * @LastEditTime: 2025-06-27 11:06:13
 * @Description: 品牌管理接口
 * @FilePath: \vue3-admin\src\api\product\trademark\index.ts
 */
import request from  '@/utils/request'
import type {TradeMarkResponseData,TradeMark} from '@/api/product/trademark/type'
// 统一管理接口
enum API {
    TRADEMARK_URL = '/admin/product/baseTrademark/',
    ADDTRADEMARK_URL = '/admin/product/baseTrademark/save',
    UPDATETRADEMARK_URL = '/admin/product/baseTrademark/update',
    DELETE_URL = '/admin/product/baseTrademark/remove/'
}
//获取列表
export const reqHasTradeMark = (page:number,limit:number)=>{
    return request.get<any,TradeMarkResponseData>(API.TRADEMARK_URL+`${page}/${limit}`)
}
//新增品牌
export const AddTradeMark = (data:TradeMark)=>{
    return request.post<any,any>(API.ADDTRADEMARK_URL,data)
}

//编辑品牌
export const  UpdateTradeMark = (data:TradeMark)=>{
    return request.put<any,any>(API.UPDATETRADEMARK_URL,data)
}

//删除品牌
export const deleteTradeMark = (id:number)=>{
    return request.delete<any,any>(API.DELETE_URL + id)
}